1. Field of the Invention
The present invention relates to an optical mouse and, more particularly, to a method of calculating movement value of an optical mouse and an optical mouse using the method for sensing by increasing region of movement value that the optical mouse is able to find.
2. Description of the Related Art
Generally, as shown in FIG. 1, in the optical mouse, light 7 emitting from a light source 8 is reflected at a worktable surface 2, and the reflected light 6 passes through a lens 5 to be input to an image sensor 3 having hundreds of pixels. A shape of surface is detected by comparing differences among pixels of the image sensor 3. And then, by comparing with a pattern made in a previous sampling period, a movement value of the optical mouse is calculated.
Generally, in order to calculate the movement value of the optical mouse, reference frame.
A correlation between a current input sample frame and the reference area is calculated while scanning every pixel by one pixel unit in a zigzag direction from an upper left end to a lower right end of the sample frame.
The location of the sample frame whose correlations are the highest is found to calculate the movement direction and distance V(x, y) in pixel unit.
However, the optical mouse is actually moved by a human operator, the optical mouse can move in small angles.
Thus, in case that the optical mouse moves below one pixel unit, the correlation for calculating the movement value is typically obtained by comparing the input sample frame and the reference frame, and thus, if the optical mouse moves above 0.5 pixel, it calculates the movement value as being moved one pixel, and if the optical mouse moves below 0.5 pixel, it calculates the movement value as not being moved.
Moreover, when the movement of the optical mouse occurs, pixel values of the entire image sensor of the current input sample frame are stored into a memory and the pixel values are updated as the reference frame, and in the next sampling, the updated reference frame is used as a reference frame.
FIG. 2 is a diagram for illustrating a method for calculating the movement value of the optical mouse of FIG. 1.
It is assumed that the optical mouse of FIG. 2 moves 0.3 in a +X direction and 3 in a +Y direction during every sampling period.
To calculate the movement value of the optical mouse during a first sampling period, the optical mouse selects an Nth frame 11 obtained through the 12×12 image sensor during the previous sampling period, as a reference frame, sets 6×6 area of a center of areas of the Nth frame 11 as reference area 12a, and selects the N+1th frame 12 obtained through the 12×12 image sensor during the first sampling period as a sample frame.
Next, the location of the N+1th frame 12 having the highest correlation with the reference area 12a of the Nth frame 11 is obtained.
As a result, it is shown that (0.3, 3) pixel position 12b of N+1th frame 12 has the highest correlation with the reference area 12a of the Nth frame 11.
Thus, the optical mouse calculates the correlation as being moved 0 pixel in the X direction and 3 pixels in the Y direction during the first sampling period, and outputs the (0, 3) pixel as the movement value according to the correlation expression.
However, during the first sampling period, the optical mouse actually moves 0.3 pixel in the +X direction, and 3 pixels in the +Y direction, therefore, it cannot calculate the movement of 0.3 pixel in the +X direction between the actual movement value and the calculated movement value.
In order to calculate the movement value of the optical mouse during the second sampling period, the optical mouse updates the N+1th frame 12 obtained during the first sampling period as a reference frame, and resets the a center area of the updated reference frame area as a reference area 13a. 
Thus, The N+2th frame 13 obtained through the image sensor during the second sampling period is selected as the sample frame 13, which is stored into the memory, and then the position having the highest correlation with the updated reference area 13a of the N+1th frame 12 is obtained, from which the movement value is calculated.
Thus, (0.3, 3) pixel position of N+1th frame 13 shows the highest correlation with the reference area 13a of the reference frame 12, and the optical mouse outputs (0, 3) pixel as the movement value.
In other words, the movement value of the optical mouse during the second sampling period has also an error of 0.3 pixel in the +X direction between the actual movement value and the calculated movement value like the movement value of the optical mouse during the first sampling period.
Therefore, while the actual movement value of the optical mouse during the first and the second sampling periods is (0.6, 6) pixel, the calculated movement value outputs (0, 6) pixel, it cannot calculate the movement of 0.6 pixel in the +X direction between the actual movement value and the calculated movement value. Accordingly, the optical mouse cannot calculate the movement in small angle, such as movement of (0.6, 6) pixel.
The conventional method for calculating the movement value of the optical mouse cannot calculate in small angles since the optical mouse changes the reference frame and the reference area in every sampling time that the movement above a predetermined value is generated and calculates the movement value of the optical mouse by one pixel unit.
In case that the optical mouse cannot calculate the movement in small angles, the optical mouse outputs an incorrect movement value.
In order to calculate the movement in small angles, the conventional optical mouse has a problem that the conventional optical mouse I the number of pixels and the memory capacity necessary for the optical mouse should be increased.